package com.sw1.test;

import com.sw1.pojo.MilkTea;
import com.sw1.pojo.TeaShop;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        TeaShop teaShop=new TeaShop();
        //初始化数据
        teaShop.initTeaArr();
        //显示
        teaShop.showmilkTea();

        //添加
        Scanner sc=new Scanner(System.in);

        do {
            //先设计
            MilkTea milkTea=new MilkTea();
            System.out.println("请输入新品类名称：");
            milkTea.teast= sc.next();
            System.out.println("请输入新品类价格：");
            milkTea.price=sc.nextDouble();
            //后添加
            teaShop.addMilkTea(milkTea);

            System.out.println("继续加吗？（Y/N）");
            String sel=sc.next();
            if(sel.equalsIgnoreCase("Y")){

            }else {
                break;
            }

        }while (true);


        //再展示一次
        teaShop.showmilkTea();

    }
}
